﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.Domain.Scheduling
{
    /// <summary>
    /// 班次表实体类
    /// </summary>
    public class Shift : Audit
    {
        /// <summary>
        /// 班次ID（主键，若数据库中是自增列，可添加自增配置）
        /// </summary>
        [Key]
        [Column("ShiftId")]
        public int ShiftId { get; set; }

        /// <summary>
        /// 班次名称
        /// </summary>
        [Column("ShiftName")]
        [StringLength(50)] // 假设名称最长 50 字符，可按需调整
        public string ShiftName { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [Column("StartTime")]
        public TimeSpan StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        [Column("EndTime")]
        public TimeSpan EndTime { get; set; }

        /// <summary>
        /// 是否夜班
        /// </summary>
        [Column("IsNightShift")]
        public bool IsNightShift { get; set; }

        /// <summary>
        /// 颜色代码
        /// </summary>
        [Column("DisplayColor")]
        [StringLength(20)] // 假设颜色代码最长 20 字符，可按需调整
        public string DisplayColor { get; set; }

        /// <summary>
        /// 加班费倍率
        /// </summary>
        [Column("OvertimeRate")]
        public decimal OvertimeRate { get; set; }

        /// <summary>
        /// 休息时间
        /// </summary>
        [Column("Breakduration")]
        public TimeSpan Breakduration { get; set; }

        /// <summary>
        /// 班次状态（可定义为枚举，如 0-禁用、1-启用等，需结合业务）
        /// </summary>
        [Column("ShiftStatus")]
        public int ShiftStatus { get; set; }

        /// <summary>
        /// 逻辑删除标识符
        /// </summary>
        public bool? IsDelete { get; set; } = false;
    }
}
